package cn.hello1023.todolist.service;

import cn.hello1023.todolist.mapper.TodoMapper;
import cn.hello1023.todolist.model.Todo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TodoServiceImpl implements TodoService{

    @Autowired
    private TodoMapper todoMapper;

    @Override
    public List<Todo> getTodoList() {
        return todoMapper.getTodoList();
    }

    @Override
    public Integer addTodo(String title) {
        return todoMapper.addTodo(title);
    }
}
